﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;
using System.Text;
using System.Data;
namespace IHISCETeim.Web.MachineSys.JSDWF
{
    public partial class JSDWFFlowConfigInnerList : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看, Permission.修改, Permission.新增, Permission.删除 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "JSDWFFlowConfigList";
            }
        }
        #region 属性 (查询条件)


        protected string Remark
        {
            get
            {
                return GetRequestValue<string>("Remark", "");

            }
        }

        protected int AdtlvlID
        {
            get
            {
                return GetRequestValue<int>("AdtlvlID", 0);

            }
        }

        protected override string orderField
        {
            get
            {
                return string.IsNullOrEmpty(base.orderField) ? "FlowID" : base.orderField;
            }
        }
        protected override string orderDirection
        {
            get
            {
                return string.IsNullOrEmpty(base.orderDirection) ? "asc" : base.orderDirection;
            }
        }


        #endregion

        protected string GetRealName(object _username)
        {
            string Username = _username.ToString();
            OUserInfo parobj = OUserController.GetByUserName(Username);
            if (parobj == null)
                return "";
            else
                return parobj.RealName;

        }

        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
            this.AddLog(Permission.查看);
        }

        protected void DataBind()
        {
            DataTable DTC = JSDWFFlowConfigController.GetAllToDataTable(AdtlvlID);


            DTC.DefaultView.Sort = SQLSort;

            this.rpMenu.DataSource = DTC.DefaultView;
            this.rpMenu.DataBind();
        }
    }
}